/**
 * Created by 鄢鹏权 on 2017/04/08.
 */
namespace Menu{
    // export enum Type{
    //     DIR="1",
    //     EDIT='1',
    //     ADD='1',
    //     LIST='1',
    //     DETAIL='1',
    // }
    export class Menu{
        static menu:Item[]=[];
        static current:Item;
        static add(item:Item){
            this.menu.push(item);
        }
        static removeByTitle(Title:string){
            // avalon.each
        }
    }
    export class Item{
        Title:string='';//标题
        Obj:string='';//对象名称
        Type:string='';//模式 DIR/EDIT/ADD/LIST/DETAIL
        Sub:Item[]=[];//子目录
        Group:number[]=[];//权限组
        Show:boolean=true;
        Class:string='';
        Html:string='';
        Attr:any={};
        Params:any={};
        DOM:string='';
        constructor(Title:string,Obj:string,Group:number[]=[0],Type:string="DIR",Sub:Item[]=[],Class:string='',Attr:any={},Show:boolean=true,Html:string='',Params:any={}){
            this.Title=Title;
            this.Obj=Obj;
            this.Sub=Sub;
            this.Group=Group;
            this.Show=Show;
            this.Type=Type;
            this.Html=Html;
            this.Class=Class;
            this.Attr=Attr;
            this.Params=Params;
        }
    }
}

